/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.hhx.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.hhx.entity.HhxFinance;
import com.thinkgem.jeesite.modules.hhx.dao.HhxFinanceDao;

/**
 * 单表生成Service
 * @author zmy
 * @version 2019-04-12
 */
@Service
@Transactional(readOnly = true)
public class HhxFinanceService extends CrudService<HhxFinanceDao, HhxFinance> {

	@Autowired
	private HhxFinanceDao hhxFinanceDao;
	public HhxFinance get(String id) {
		return super.get(id);
	}
	
	public List<HhxFinance> findList(HhxFinance hhxFinance) {
		return super.findList(hhxFinance);
	}
	
	public Page<HhxFinance> findPage(Page<HhxFinance> page, HhxFinance hhxFinance) {
		return super.findPage(page, hhxFinance);
	}
	
	@Transactional(readOnly = false)
	public void save(HhxFinance hhxFinance) {
		super.save(hhxFinance);
	}
	
	@Transactional(readOnly = false)
	public void delete(HhxFinance hhxFinance) {
		super.delete(hhxFinance);
	}

	public HhxFinance wxget(String userid) {
		// TODO Auto-generated method stub
		return hhxFinanceDao.wxget(userid);
	}

	@Transactional(readOnly = false)
	public int insertFinance(String id, String userid, String trade, String description, String year1, String income1,
			String profit1, String year2, String income2, String profit2, String plan, String type, String organization,
			String ismerge, String extra, String amt) {
//		return hhxFinanceDao.wxinsert("1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1");
		return hhxFinanceDao.wxinsert(id,userid,trade,description,year1,income1,profit1,year2,income2,profit2,plan,type,organization,ismerge,extra,amt);
	}

	@Transactional(readOnly = false)
	public int updateamt(String financeid) {
		// TODO Auto-generated method stub
		return hhxFinanceDao.updateamt(financeid);
	}
	
}